#ifndef DASHBOARD_H
#define DASHBOARD_H

#include <QWidget>
#include <QPixmap>
#include <QMatrix>
#include <QGraphicsScene>
#include <QGraphicsPixmapItem>
#include <QResizeEvent>

namespace Ui {
class DashBoard;
}

class DashBoard : public QWidget
{
    Q_OBJECT

public:
    explicit DashBoard(QWidget *parent = 0);
    ~DashBoard();

public slots:
    void carInfo(QStringList info);

signals:
    void driveMode(bool );//true: auto

private slots:
    void on_drive_mode_clicked(bool checked);

    void on_drive_mode_toggled(bool checked);

private:
    Ui::DashBoard *ui;
    QMatrix matrix;
    QPixmap pixDir;
    QGraphicsScene* scene;
    QGraphicsPixmapItem* item;
    int dirVal;

    void resizeEvent(QResizeEvent*);
    void setSpeed(QString speed);
    void setAcce(QString acce);
    void setBrake(QString brake);
    void setDir(QString dir);
    void setParkingBrake(QString brake);
    void setTrafficLightFlag(QString light);
    void setDriveMode(QString driveMode);
};

#endif // DASHBOARD_H
